<template>
    <div class="container">

        <div class="body_wrap">

            <el-card shadow="hover" ref="content_card">

                <!-- 搜索+功能按钮 -->
                <el-form ref="search" :inline="true" :model="queryParams" size="medium" label-width="120px">
                    <el-card class="table_tool_bar_wrap mb10" shadow="never">
                        <div class="base_wrap">
                            <div class="left">
                                <el-form-item label="">
                                    <DeptCascader
                                        ref="cascader_dept"
                                        :cascaderDeptVal.sync="queryParams.deptIds"
                                        :checkStrictly="true"
                                        @clear="queryParams.deptIds=null">
                                    </DeptCascader>
                                </el-form-item>

                                <el-form-item label="" prop="keyword">
                                    <el-input placeholder="请输入..." prefix-icon="el-icon-search" v-model="queryParams.keyword" clearable/>
                                </el-form-item>

                                <el-button @click="handleSearch" type="primary" size="medium">搜索</el-button>
                                <el-button @click="handleReset" type="info" plain size="medium">重置</el-button>

                                <el-button type="text" size="medium" @click="toggleSearchStatus = !toggleSearchStatus">{{toggleSearchStatus ? '收起' : '展开'}}<i class="el-icon--right" :class="toggleSearchStatus?'el-icon-arrow-up':'el-icon-arrow-down'"></i></el-button>
                            </div>

                            <div class="right">
                                <el-button @click="handleAddOrUpdateVisible()" type="primary" size="medium" icon="el-icon-plus">新增</el-button>
                                <el-button @click="handleDelete()" type="danger" size="medium" icon="el-icon-delete" :disabled="selectionRows.length == 0">删除</el-button>

                                <el-dropdown @command="handleCommand" class="ml10">
                                    <el-button type="primary" size="medium">
                                        更多<i class="el-icon-arrow-down el-icon--right"></i>
                                    </el-button>
                                    <el-dropdown-menu slot="dropdown">
                                        <el-dropdown-item command="batch-setting-status">设置在职状态</el-dropdown-item>
                                        <el-dropdown-item command="batch-setting-dept">批量调换部门</el-dropdown-item>
                                        <el-dropdown-item command="batch-setting-post">批量调换岗位</el-dropdown-item>
                                        <el-dropdown-item command="export-data" divided>导出员工数据</el-dropdown-item>
                                    </el-dropdown-menu>
                                </el-dropdown>

                            </div>
                        </div>

                        <div v-show="toggleSearchStatus" class="search_toggle mt10">
                            <el-row :gutter="10">
                                <el-col :sm="24" :md="8" :lg="8" :xl="6">
                                    <el-form-item label="员工姓名" prop="name">
                                        <el-input placeholder="" v-model="queryParams.name" clearable/>
                                    </el-form-item>
                                </el-col>
                                <el-col :sm="24" :md="8" :lg="8" :xl="6">
                                    <el-form-item label="员工性别" prop="sex">
                                        <DictSelect ref="select" code="XB" :selectVal.sync="queryParams.sex" styles="width:100%"></DictSelect>
                                    </el-form-item>
                                </el-col>
                                <el-col :sm="24" :md="8" :lg="8" :xl="6">
                                    <el-form-item label="员工岗位" prop="post">
                                        <PostCascader
                                            ref="cascader_post"
                                            :cascaderPostVal.sync="queryParams.postIds"
                                            :checkStrictly="true"
                                            :clearable="false"
                                            @clear="queryParams.postIds=null">
                                        </PostCascader>
                                    </el-form-item>
                                </el-col>
                                <el-col :sm="24" :md="8" :lg="8" :xl="6">
                                    <el-form-item label="在职状态" prop="status">
                                        <DictSelect ref="select" code="YGZT" :selectVal.sync="queryParams.status" styles="width:100%"></DictSelect>
                                    </el-form-item>
                                </el-col>
                                <el-col :sm="24" :md="8" :lg="8" :xl="6">
                                    <el-form-item label="工作状态" prop="workStatus">
                                        <DictSelect ref="select" code="GZZT" :selectVal.sync="queryParams.workStatus" styles="width:100%"></DictSelect>
                                    </el-form-item>
                                </el-col>
                                <el-col :sm="24" :md="8" :lg="8" :xl="6">
                                    <el-form-item label="出生日期" prop="birthday">
                                        <el-date-picker
                                            clearable
                                            v-model="queryParams.birthday"
                                            type="date"
                                            placeholder="选择日期"
                                            value-format="yyyy-MM-dd">
                                        </el-date-picker>
                                    </el-form-item>
                                </el-col>
                                <el-col :sm="24" :md="8" :lg="8" :xl="6">
                                    <el-form-item label="联系电话" prop="telephone">
                                        <el-input placeholder="" v-model="queryParams.telephone" clearable/>
                                    </el-form-item>
                                </el-col>
                                <el-col :sm="24" :md="8" :lg="8" :xl="6">
                                    <el-form-item label="邮箱地址" prop="email">
                                        <el-input placeholder="" v-model="queryParams.email" clearable/>
                                    </el-form-item>
                                </el-col>
                                <el-col :sm="24" :md="8" :lg="8" :xl="6">
                                    <el-form-item label="入职日期">
                                        <el-date-picker
                                            v-model="dateRange"
                                            type="daterange"
                                            range-separator="至"
                                            start-placeholder="开始日期"
                                            end-placeholder="结束日期"
                                            value-format="yyyy-MM-dd"
                                            clearable
                                            style="width: 250px">
                                        </el-date-picker>
                                    </el-form-item>
                                </el-col>

                            </el-row>
                        </div>
                    </el-card>
                </el-form>

                <!-- 表格 -->
                <el-table
                    class="emp_table mt10"
                    ref="table"
                    size="medium"
                    height="650"
                    empty-text="暂无数据"
                    element-loading-text="给我一点时间"
                    fit border highlight-current-row
                    :stripe="stripe"
                    v-loading="loading"
                    :data="dataList"
                    :row-class-name="tableRowClassName"
                    @selection-change="handleSelection">

                    <el-table-column type="selection" width="55" prop="selection" v-if="isHideColumn('selection')" align="center"></el-table-column>
                    <el-table-column label="序号" type="index" prop="index" v-if="isHideColumn('index')" fixed width="60" align="center"/>
                    <el-table-column label="工号" prop="workNo" v-if="isHideColumn('workNo')" fixed align="left" width="100px" show-overflow-tooltip/>
                    <el-table-column label="姓名" prop="name" v-if="isHideColumn('name')" fixed align="left" width="100px" show-overflow-tooltip/>
                    <el-table-column label="部门" prop="deptName" v-if="isHideColumn('deptName')" fixed align="left" width="150px" show-overflow-tooltip/>
                    <el-table-column label="岗位" prop="postName" v-if="isHideColumn('post')" align="left" width="100px" show-overflow-tooltip/>
                    <el-table-column label="在职状态" align="center" width="100px">
                        <template slot-scope="scope">
                            <span v-if="scope.row.status == '1'" class="primary">在职</span>
                            <span v-else-if="scope.row.status == '2'" class="info">离职</span>
                            <span v-else-if="scope.row.status == '3'" class="danger">退休</span>
                            <span v-else-if="scope.row.status == '4'" class="danger">停薪留职</span>
                            <span v-else-if="scope.row.status == '5'" class="primary">退休返聘</span>
                        </template>
                    </el-table-column>
                    <el-table-column label="工作状态" align="center" width="100px">
                        <template slot-scope="scope">
                            <span v-if="scope.row.workStatus == '1'" class="primary">待机状态</span>
                            <span v-else-if="scope.row.workStatus == '2'" class="success">在项目中</span>
                            <span v-else-if="scope.row.workStatus == '3'" class="danger">离职离岗</span>
                        </template>
                    </el-table-column>
                    <el-table-column label="入职日期" prop="startDate" v-if="isHideColumn('startDate')" align="left" width="120px" show-overflow-tooltip/>
                    <el-table-column label="离职日期" prop="endDate" v-if="isHideColumn('endDate')" align="left" width="120px" show-overflow-tooltip/>
                    <el-table-column label="性别" prop="sex" v-if="isHideColumn('sex')" align="center" width="80px" show-overflow-tooltip>
                        <template slot-scope="scope">
                            <span v-if="scope.row.sex == '1'" class="primary">男</span>
                            <span v-else-if="scope.row.sex == '2'" class="danger">女</span>
                        </template>
                    </el-table-column>
                    <el-table-column label="出生日期" prop="birthday" v-if="isHideColumn('birthday')" align="left" width="120px" show-overflow-tooltip/>
                    <el-table-column label="年龄" prop="age" v-if="isHideColumn('age')" align="center" width="100px" show-overflow-tooltip/>
                    <el-table-column label="在司年限" prop="workAge" v-if="isHideColumn('workAge')" align="center" width="100px" show-overflow-tooltip/>
                    <el-table-column label="来源" prop="source" v-if="isHideColumn('source')" align="center" width="100px" show-overflow-tooltip/>
                    <el-table-column label="毕业院校" prop="university" v-if="isHideColumn('university')" align="left" width="220px" show-overflow-tooltip/>
                    <el-table-column label="专业" prop="major" v-if="isHideColumn('major')" align="left" width="120px" show-overflow-tooltip/>
                    <el-table-column label="学历" prop="educationLevel" v-if="isHideColumn('educationLevel')" align="center" width="100px" show-overflow-tooltip/>
                    <el-table-column label="毕业时间" prop="graduatTime" v-if="isHideColumn('graduatTime')" align="center" width="100px" show-overflow-tooltip/>
                    <el-table-column label="日语等级" prop="japaneseGrade" v-if="isHideColumn('japaneseGrade')" align="center" width="100px" show-overflow-tooltip>
                        <template slot-scope="scope">
                            {{ handleFilterDict('JP_LEVEL', scope.row.japaneseGrade) }}
                        </template>
                    </el-table-column>
                    <el-table-column label="英语等级" prop="englishGrade" v-if="isHideColumn('englishGrade')" align="center" width="100px" show-overflow-tooltip>
                        <template slot-scope="scope">
                            {{ handleFilterDict('EN_LEVEL', scope.row.englishGrade) }}
                        </template>
                    </el-table-column>
                    <el-table-column label="籍贯" prop="nativePlace" v-if="isHideColumn('nativePlace')" align="center" width="100px" show-overflow-tooltip/>
                    <el-table-column label="身份证号码" prop="idCardNo" v-if="isHideColumn('idCardNo')" align="left" width="200px" show-overflow-tooltip/>
                    <el-table-column label="联系电话" prop="telephone" v-if="isHideColumn('telephone')" align="left" width="130px" show-overflow-tooltip/>
                    <el-table-column label="家庭电话" prop="phoneNo" v-if="isHideColumn('phoneNo')" align="left" width="130px" show-overflow-tooltip/>
                    <el-table-column label="邮箱地址" prop="email" v-if="isHideColumn('email')" align="left" width="230px" show-overflow-tooltip/>

                    <el-table-column label="备注" prop="remarks" v-if="isHideColumn('remarks')" width="200px" align="left" show-overflow-tooltip/>
                    <el-table-column label="更新人" prop="uname" v-if="isHideColumn('uname')" align="left" width="120px" show-overflow-tooltip/>
                    <el-table-column label="更新时间" prop="utime" v-if="isHideColumn('utime')" align="left" width="160px" show-overflow-tooltip/>

                    <el-table-column label="操作" prop="btn" v-if="isHideColumn('btn')" width="200px" align="left" fixed="right">
                        <template slot-scope="scope">
                            <el-button @click="handleAddOrUpdateVisible(scope.row.id)" type="text" size="small">编辑</el-button>
                            <el-button @click="handleDelete(scope.row)" type="text" size="small">删除</el-button>
                            <el-button @click="handleDrawerVisible(scope.row.id)" type="text" size="small">详情</el-button>
                        </template>
                    </el-table-column>

                </el-table>

                <!-- 分页 -->
                <TablePagination
                    :total.sync="queryParams.total"
                    :page.sync="queryParams.page"
                    :limit.sync="queryParams.limit"
                    @handleSizeChange="handleSizeChange"
                    @handleCurrentChange="handleCurrentChange"/>
            </el-card>

            <!-- 弹窗, 新增 / 修改 -->
            <AddOrUpdate ref="addOrUpdate" @refreshDataList="getDataList"></AddOrUpdate>

            <!-- 设置员工状态 -->
            <BatchSettingStatusDialog ref="BatchSettingStatusDialog" @refreshDataList="getDataList"/>
            <!-- 批量调换部门 -->
            <BatchSettingDeptDialog ref="BatchSettingDeptDialog" @refreshDataList="getDataList"/>
            <!-- 批量调换部门 -->
            <BatchSettingPostDialog ref="BatchSettingPostDialog" @refreshDataList="getDataList"/>


            <!-- 右侧抽屉,详情信息 -->
            <el-drawer
                ref="drawer"
                class="drawer_wrap"
                size="1000px"
                :visible.sync="drawerVisible"
                :with-header="false"
                :modal="true"
                direction="rtl"
                :before-close="handleCloseDrawerDetail">
                <div class="header_title">
                    <div class="title"><i class="el-icon-document"></i> 详情</div>
                    <div class="close el-icon-close" @click="$refs.drawer.closeDrawer()"></div>
                </div>

                <div class="header_body">
                    <table class="detail_wrap" v-if="detail">
                        <tbody>
                            <tr>
                                <td class="title">部门</td>
                                <td class="info">{{detail.deptName}}</td>
                                <td class="title">岗位</td>
                                <td class="info">{{detail.postName}}</td>
                            </tr>
                            <tr>
                                <td class="title">工号</td>
                                <td class="info">{{detail.workNo}}</td>
                                <td class="title">姓名</td>
                                <td class="info">{{detail.name}}</td>
                            </tr>
                            <tr>
                                <td class="title">性别</td>
                                <td class="info">
                                    <span v-if="detail.sex == '1'">男</span>
                                    <span v-else-if="detail.sex == '2'">女</span>
                                </td>
                                <td class="title">来源</td>
                                <td class="info">{{detail.source}}</td>

                            </tr>
                            <tr>
                                <td class="title">在职状态</td>
                                <td class="info">
                                    <span v-if="detail.status == '1'" class="primary">在职</span>
                                    <span v-else-if="detail.status == '2'" class="info">离职</span>
                                    <span v-else-if="detail.status == '3'" class="danger">退休</span>
                                    <span v-else-if="detail.status == '4'" class="danger">停薪留职</span>
                                    <span v-else-if="detail.status == '5'" class="primary">退休返聘</span>
                                </td>
                                <td class="title">工作状态</td>
                                <td class="info">
                                    <span v-if="detail.workStatus == '1'" class="primary">待机状态</span>
                                    <span v-else-if="detail.workStatus == '2'" class="success">在项目中</span>
                                    <span v-else-if="detail.workStatus == '3'" class="danger">离职离岗</span>
                                </td>
                            </tr>
                            <tr>
                                <td class="title">入职日期</td>
                                <td class="info">{{detail.startDate}}</td>
                                <td class="title">离职日期</td>
                                <td class="info">
                                    <el-link v-if="detail.endDate" type="danger" :underline="false">{{detail.endDate}}</el-link>
                                    <el-link v-else :underline="false">-</el-link>
                                </td>
                            </tr>
                            <tr>
                                <td class="title">生日</td>
                                <td class="info">{{detail.birthday}}</td>
                                <td class="title">年龄</td>
                                <td class="info">{{detail.age}}</td>
                            </tr>
                            <tr>
                                <td class="title">毕业院校</td>
                                <td class="info">{{detail.university}}</td>
                                <td class="title">毕业时间</td>
                                <td class="info">{{detail.graduatTime}}</td>
                            </tr>
                            <tr>
                                <td class="title">专业</td>
                                <td class="info">{{detail.major}}</td>
                                <td class="title">学历</td>
                                <td class="info">{{detail.educationLevel}}</td>
                            </tr>
                            <tr>
                                <td class="title">英语等级</td>
                                <td class="info">{{ handleFilterDict('EN_LEVEL', detail.englishGrade) }}</td>
                                <td class="title">日语等级</td>
                                <td class="info">{{ handleFilterDict('JP_LEVEL', detail.japaneseGrade) }}</td>
                            </tr>
                            <tr>
                                <td class="title">身份证号码</td>
                                <td class="info">{{detail.idCardNo}}</td>
                                <td class="title">籍贯</td>
                                <td class="info">{{detail.nativePlace}}</td>
                            </tr>
                            <tr>
                                <td class="title">户口性质</td>
                                <td class="info">{{detail.domicileProp}}</td>
                                <td class="title">户口所在地</td>
                                <td class="info">{{detail.domicilePlace}}</td>
                            </tr>
                            <tr>
                                <td class="title">家庭电话</td>
                                <td class="info">{{detail.phoneNo}}</td>
                                <td class="title">联系电话</td>
                                <td class="info">{{detail.telephone}}</td>
                            </tr>
                            <tr>
                                <td class="title" colspan="3">邮箱地址</td>
                                <td class="info">{{detail.email}}</td>
                            </tr>
                            <tr>
                                <td class="title">备注</td>
                                <td class="info" colspan="3">{{detail.remarks}}</td>
                            </tr>

                        </tbody>
                    </table>
                </div>
            </el-drawer>

        </div>
    </div>
</template>

<script>
    import TableMixin from '@/mixin/TableMixin'
    import TableTools from '@/views/components/table/table-tools'
    import TablePagination from '@/views/components/table/table-pagination'
    import DeptCascader from '@/views/hr/dept/components/show-dept-cascader'
    import PostCascader from '@/views/hr/post/components/show-post-cascader'
    import DictSelect from '@/views/system/sysdict/components/dict-select'
    import getDict from '@/views/system/sysdict/utils/dict'
    import AddOrUpdate from './add-or-update-dialog'
    import BatchSettingStatusDialog from './batch-setting-status-dialog'
    import BatchSettingDeptDialog from './batch-setting-dept-dialog'
    import BatchSettingPostDialog from './batch-setting-post-dialog'

    export default {
        mixins: [TableMixin],
        components: {
            TableTools,
            TablePagination,
            AddOrUpdate,
            DeptCascader,
            PostCascader,
            DictSelect,
            BatchSettingStatusDialog,
            BatchSettingPostDialog,
            BatchSettingDeptDialog
        },

        data() {
            return {
                dataList: [],
                dateRange: null,
                queryParams: {
                    sortColumns: 'work_no',
                    sortType: 'ASC',
                    startDateRange: null,
                    deptIds: null,
                    postIds: null,
                    workNo: null,
                    name: null,
                    sex: null,
                    workStatus: null,
                    startDate: null,
                    birthday: null,
                    email: null,
                    status: null
                },
                detail: {
                    workNo: null,
                    name: null,
                    sex: null,
                    post: null,
                    joinDate: null,
                    deptName: null,
                    postName: null,
                    source: null,
                    workStatus: null,
                    university: null,
                    major: null,
                    educationLevel: null,
                    graduatTime: null,
                    japaneseGrade: null,
                    englishGrade: null,
                    idCardNo: null,
                    nativePlace: null,
                    birthday: null,
                    marriageStatus: null,
                    domicilePlace: null,
                    domicileProp: null,
                    telephone: null,
                    phoneNo: null,
                    email: null,
                    status: null,
                    remarks: null
                },

                dicts: [],

            }
        },

        created() {
        },

        mounted() {
            this.$nextTick(() => {
                this.handleGetColumnDict(['EN_LEVEL', 'JP_LEVEL'])

                this.getDataList()
            })
        },

        methods: {

            /**
             * 侧边栏抽屉打开
             */
            handleDrawerVisible(id) {
                this.getInfo(id)
                this.drawerVisible = true
            },

            /**
             * 新增或编辑
             */
            handleAddOrUpdateVisible(id) {
                // 表单窗口
                this.$nextTick(() => {
                    this.$refs.addOrUpdate.init(id)
                })
            },

            /**
             * 设置员工状态
             * @param {*} id
             */
            BatchSettingStatusDialogVisible() {
                this.$nextTick(() => {
                    if(this.selectionRows.length > 0) {
                        this.$refs.BatchSettingStatusDialog.init(this.selectionRows)
                    } else {
                        this.$notify({title: '提示', message: '请选择需要操作的记录！', type: 'info'});
                    }
                })
            },

            /**
             * 批量调换部门
             * @param {*} id
             */
            BatchSettingDeptDialogVisible(id) {
                this.$nextTick(() => {
                    if(this.selectionRows.length > 0) {
                        this.$refs.BatchSettingDeptDialog.init(this.selectionRows)
                    } else {
                        this.$notify({title: '提示', message: '请选择需要操作的记录！', type: 'info'});
                    }
                })
            },

            /**
             * 批量调换岗位
             * @param {*} id
             */
             BatchSettingPostDialogVisible(id) {
                this.$nextTick(() => {
                    if(this.selectionRows.length > 0) {
                        this.$refs.BatchSettingPostDialog.init(this.selectionRows)
                    } else {
                        this.$notify({title: '提示', message: '请选择需要操作的记录！', type: 'info'});
                    }
                })
            },

            /**
             * 删除
             */
            async handleDelete(row) {
                let ids = []
                if (row) {
                    ids.push(row.id)
                }
                if (this.selectionRows) {
                    this.selectionRows.filter((item, index) => {
                        ids.push(item.id)
                    })
                }
                if (ids.length <= 0) {
                    this.$notify({title: '提示', message: '请选择需要删除的记录！', type: 'info'});
                } else {
                    const confirm = await this.$confirm('确定要删除？', '提示', {type: 'warning'}).catch(() => {
                    })
                    if (confirm) {
                        const res = await this.$http({
                            url: '/hr/employee/delete',
                            method: 'POST',
                            data: ids
                        })
                        if (this.ResultMessage(res)) {
                            this.getDataList()
                        }
                    }
                }
            },

            /**
             * 详细信息
             */
            async getInfo(id) {
                if (id) {
                    const res = await this.$http({
                        url: '/hr/employee/info/' + id,
                        method: 'GET'
                    })
                    this.detail = Object.assign({}, res.data)
                }
            },

            /**
             * 获取表格数据
             */
            async getDataList() {
                if(this.dateRange && this.dateRange.length > 0) {
                    this.queryParams.startDateRange = this.dateRange.join(',')
                } else {
                    this.queryParams.startDateRange = null
                }

                this.loading = true
                const res = await this.$http({
                    url: '/hr/employee/page',
                    method: 'GET',
                    params: this.queryParams
                })
                if (this.ResultMessage(res, false)) {
                    this.dataList = res.data.records || []
                    this.queryParams.total = res.data.total
                }
                this.loading = false
            },

            /**
             * 获取字典数据
             */
            async handleGetColumnDict(codes) {
                this.dicts = await getDict(codes)
            },

            /**
             * 根据表格数据筛选出对应的字典label
             * @param {*} key
             */
            handleFilterDict(label, val) {
                if(val) {
                    let dicts = Object.values(this.dicts[label])
                    let dict = dicts.filter(item => {
                        if(item.value === val) {
                            return item
                        }
                    })
                    return dict[0].label
                }
            },

            /**
             * 更多
             */
            async handleCommand(command) {
                if (command === "export-data") {
                    this.handleExport()
                } else if(command === 'batch-setting-status') {
                    this.BatchSettingStatusDialogVisible()
                } else if(command === 'batch-setting-dept') {
                    this.BatchSettingDeptDialogVisible()
                } else if(command === 'batch-setting-post') {
                    this.BatchSettingPostDialogVisible()
                }
            },

            /**
             * 下载导出数据
             */
            async handleExport() {
                const notify = this.$notify({ title: '提示', message: '正在下载，请稍等。', type: 'success', duration: 0 });
                const data = await this.$http({
                    url: '/hr/employee/export',
                    method: 'POST',
                    responseType: 'blob',
                    data: {},
                }).catch(err => {
                    setTimeout(() => {
                        notify.close()
                        this.$notify({title: '错误', message: err, type: 'error'});
                    }, 1000)
                })

                if (!data) { return }
                let url = window.URL.createObjectURL(new Blob([data]));
                let link = document.createElement('a');
                link.style.display = 'none';
                link.href = url;
                link.setAttribute('download', data.filename);

                document.body.appendChild(link);
                link.click()
                setTimeout(() => { notify.close() }, 1000)
            },

            /**
             * 设置员工状态为离职的背景颜色
             * @param {*} param0
             */
            tableRowClassName({row, rowIndex}) {
                if (row.status === '2' || row.status === '3' || row.status === '4' || row.status === '5') {
                    return 'warning-row';
                }
                return '';
            },

            /**
             * 搜索
             */
            handleSearch() {
                this.handleResetPage()
                this.getDataList()
            },

            /**
             * 重新加载数据表格
             */
            handleReload() {
                this.getDataList()
            },

            /**
             * 重置搜索表单
             */
            handleReset() {
                this.handleResetPage()
                this.$refs.search.resetFields()

                this.queryParams.deptIds = null
                this.$refs.cascader_dept.clearVal()
                this.queryParams.postIds = null
                this.$refs.cascader_post.clearVal()

                this.dateRange = null
                this.queryParams.startDateRange = null

                this.$refs.select.clearVal()

                this.getDataList()
            }

        }

    }
</script>

<style lang="scss">
.container{
    .body_wrap{
        .emp_table{
            .warning-row {
                // background: oldlace;
            }
        }
    }
}
</style>
<style lang="scss" scoped></style>
